package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 套餐配置
 * @Author: sean
 * @Date:   2024-08-02
 * @Version: V1.0
 */
@Data
@TableName("rental_package_config")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_package_config_new对象", description="套餐配置")
public class RentalPackageConfig implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**归属套餐*/
	@Excel(name = "归属套餐", width = 15)
    @ApiModelProperty(value = "归属套餐")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long packageId;
	/**车辆类型*/
	@Excel(name = "车辆类型", width = 15)
    @ApiModelProperty(value = "车辆类型")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carTypeId;
    @TableField(exist = false)
    private String carTypeName;
	/**套餐名称*/
	@Excel(name = "套餐名称", width = 15)
    @ApiModelProperty(value = "套餐名称")
    private String packageName;
	/**套餐类型*/
	@Excel(name = "套餐类型", width = 15)
    @ApiModelProperty(value = "套餐类型")
    private String packageType;

    /**
     * 套餐时长单位
     */
    @TableField(exist = false)
    private String packageTypeName;

    /**
     * 套餐时长单位
     */
    @TableField(exist = false)
    private String packageUtil;

	/**套餐时长*/
	@Excel(name = "套餐时长", width = 15)
    @ApiModelProperty(value = "套餐时长")
    private BigDecimal duration;
	/**价格*/
	@Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
	/**租赁套餐配置*/
	@Excel(name = "租赁套餐配置", width = 15)
    @ApiModelProperty(value = "租赁套餐配置")
    private Boolean isRental;
	/**超时计费配置*/
	@Excel(name = "续租计费配置", width = 15)
    @ApiModelProperty(value = "续租计费配置")
    private Boolean isRenew;
    @ApiModelProperty(value = "归属部门机构")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
	/**是否删除（0：否、1：是）*/
	@Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;
}
